home *** CD-ROM | disk | FTP | other *** search
/ World of Amiga / World of Amiga.iso / archive / compression / lister12.lha / Lister.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-02  |  1.7 KB  |  75 lines

  1. /*
  2.   Include file for Lister
  3.   Copyright 1991 BAF! Technologies
  4.   Geoffrey Faivre-Malloy & Kerry Cianos
  5.   GF7609CSCI               KTC0440CSCI
  6.   Bix - mduck
  7. */
  8.  
  9. /* if you want lister to verify that the date is correct make sure that this
  10.  * is not commented out when you compile.
  11.  *
  12.  *#define CHECKDATE YES
  13.  */
  14.  
  15. #define NUMTYPES 9
  16.  
  17. #include <exec/types.h>
  18. #include <stdio.h>
  19. #include <string.h>
  20. #include <stdlib.h>
  21. #include <ctype.h>
  22. #include <time.h>
  23. #include "Protos.h"
  24.  
  25. typedef UBYTE (*myfunc_p)(ULONG type,UBYTE *infile);
  26.  
  27. #define ABORT    0
  28. #define OK       1
  29. #define SAME     0x001000
  30. #define ADD_EXT  0x010000
  31. #define NOTFOUND 0x100000
  32. #define ARC     0x000001
  33. #define ARJ      0x000002
  34. #define CPIO     0x000004
  35. #define LHARC     0x000008
  36. #define LHA      0x000010
  37. #define SIT     0x000020
  38. #define TAR      0x000040
  39. #define ZIP     0x000080
  40. #define ZOO     0x000100
  41.  
  42. /* error code defines */
  43. #define FILE_ERROR    2
  44. #define NOT_FOUND     3
  45. #define WRONG_ARCHIVE 4
  46. #define UNKNOWN       5
  47.  
  48. #define SEEK_SET      0
  49. #define SEEK_CUR      1
  50.  
  51. /* Archive signatures. */
  52. #define CPIO_SIG "\x30\x37\x30\x37\x30\x37"
  53. #define SIT_SIG  "\x53\x49\x54\x21"
  54. #define ZIP_SIG  "\x50\x4b\x03\x04"
  55. #define ARJ_SIG  "\x60\xea"
  56. #define ZOO_SIG  "\xfd\xc4\xa7\xdc"
  57.  
  58. /* the months of the year */
  59. char *months[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
  60.                      "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
  61. char *filetype[NUMTYPES] = { ".arc",".arj",".cpio",".lzh",".lha",".sit",".tar",".zip",".zoo" };
  62.  
  63. struct TarInfoBlock {
  64.   char name[100];
  65.   char mode[8];
  66.   char uid[8];
  67.   char gid[8];
  68.   char size[12];
  69.   char mtime[12];
  70.   char chksum[8];
  71.   char linkflag[1];
  72.   char linkname[100];
  73.   char rdev[6];
  74.    };
  75.